home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 25
/
Cream of the Crop 25.iso
/
os2
/
daytime.zip
/
README
< prev
next >
Wrap
Text File
|
1995-12-07
|
3KB
|
57 lines
This file documents the time and daytime server and client programs
for IBM TCP/IP 2.0. There is one server program (the daytimed.exe
daemon) and a client program (daytime.exe). The server implements the
RFC 867 (daytime) and RFC 868 (time) services, both for TCP and UDP
protocols. The client can use either service and either protocol to
retrieve the time from another host and adjust the local clock.
While the daytime service is more intended for human use, the time
service is meant for machine use, like in these programs. But the
server and client support both services, for completeness. Also, they
are named after the daytime service even though the time service is
the preferred method, because naming them time and timed would be a
bit impractical for the client program ...
Full source code is included, the programs can compiled with the emx
package (gcc) or IBM C Set++ and require TCP/IP headers.
To install, copy both programs into \tcpip\bin or elsewhere in the
PATH. You are now already ready to use the client program. Run it
without arguments to get a short description. The default for it is to
use the time service on the remote host via TCP protocol. You can
specify a time offset, to adjust for the case that the remote time
server is in a different time zone than the local machine. The offset
is in seconds.
To use the server program, you must decide if you want to run it all
the time as a standalone daemon or as a subservice from the inetd
super-daemon. The inetd method saves memory but makes the response
time longer (since the server must be started for each request). In
addition, when used with inetd, the server can only respond to
requests via the TCP protocol, not to UDP requests, due to the way
inetd is implemented under OS/2 and due to my own laziness. But then,
usually the TCP protocol is used only anyway. If the server is called
with -?, it also display a list of options, but they are all for use
with inetd only (except that -U does not work with it, of course).
To use the daytimed server with inetd, two lines must be added to
\tcpip\etc\inetd.lst:
daytime tcp daytimed -d
time tcp daytimed -t
That's all, then you have to restart inetd.
This code is in the public domain, but let me know if you make
improvements to it or fix something that I missed.
Kai Uwe Rommel
--
/* Kai Uwe Rommel ARS Computer & Consulting GmbH, Muenchen, Germany *
* rommel@ars.de CompuServe 100265,2651, Fax +49 89 324 4524 *
* rommel@leo.org (ftp.leo.org:/pub/comp/os/os2 maintenance) */
DOS ... is still a real mode only non-reentrant interrupt
handler, and always will be. -Russell Williams